#include <stdio.h>

//阶乘

int Factorial(int n)
{
    int Fac = 1;
    if (n > 1) {
        Fac = Factorial(n - 1);
    }
    return n * Fac;
}
int main() {
    int num = 0;
    scanf("%d", &num);
    int ret = Factorial(num);
    printf("%d", ret);
    return 0;
}